//
//  Extension+UIImageView.swift
//  PHWeibo
//
//  Created by 潘荟 on 16/7/22.
//  Copyright © 2016年 BAT. All rights reserved.
//

import UIKit
import SDWebImage

extension UIImageView {
    
    convenience init(imgName: String) {
        self.init(image: UIImage(named: imgName))
    }
    
//    func demo() {
//        self.sd_setImageWithURL(<#T##url: NSURL!##NSURL!#>, placeholderImage: <#T##UIImage!#>)
//    }
    //仿照上面方法
    func ph_setImage(urlString:String?,placeholderImageName:String) {
        self.sd_setImageWithURL(NSURL(string: urlString ?? ""), placeholderImage: UIImage(named: placeholderImageName))
    }
    
}
